The guide rails of an elevator, such as the car guide rails or counterweight guide rails, are conventionally manufactured from a solid piece. A problem with these types of guide rails is the great weight and price. Likewise, the transportation and handling of them is awkward. Guide rails that are formed to be partially hollow are also known in the art. One problem with them, however, is the noise during operation, because this type of guide rail may start to resound during use. Another problem is also the disadvantageous behavior in a gripping situation, because the strong compression exerted on a guide rail in gripping can shape the guide rail, causing unevenness in the guide rail. That being the case, hollow guide rails according to prior art have had to be formed into heavy structures so that the guide rails withstand gripping. Yet another problem has been the fixing of a guide rail into its position. The guide rails of an elevator are generally fixed in position by stacking elongated guide rails to be supported by each other in the vertical direction and by supporting them on the building to be immovable in the lateral direction with guide rail brackets, which aim to permit longitudinal movement of a guide rail in relation to the building. A guide rail must be able to move in relation to the building because the dimensional changes of a long guide rail line and of the building in relation to time are different. After the construction phase the drying of concrete, in particular, results in shrinking of the building, a consequence of which can be compression of the guide rail line into a curve if the guide rails of the guide rail line are not able to move in relation to the building. This relative movement is in prior art arranged to occur e.g. with sliding between a guide rail bracket rigidly fixed to the building and the guide rail. In these types of solutions the guide rail clamp of the guide rail bracket presses the guide rail against the base comprised in the guide rail bracket. A problem of this solution is that the thickness tolerances of the guide rails are large and the compression force exerted by the guide rail clamp on the guide rail might form to be too great, preventing sliding between the guide rail and the clamp. A consequence of this can be bulging of the guide rail line as the guide rails are compressed into a curve, particularly when the guide rails are hollow. A problem of a guide rail clamp fixing has also been that the guide rail bracket and the guide rail clamp take space, because the clamp must extend to the side and to the front of the guide rail to press the guide rail against the mounting base formed by the frame of the guide rail bracket. Another problem in the fixing of guide rails has been that if it is desired to avoid guide rail clamps it has been necessary to make holes in the guide rails by drilling either at the factory or on site. Drilling is an ineffective manufacturing method and the positions of the holes must be accurately selected in advance. A hole fixing has also left the head of the bolt on the front side of the guide rail in view, taking space from in front of the guide rail.